package com.wang.data.controllers;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.wang.data.client.WClient;

@RestController
public class MainController {
	@Autowired
	private WClient client;

	@RequestMapping(path = "/")
	public String home() {
		return "welcome";
	}

	@RequestMapping(path = "/send/{no}")
	public String sendMessage(@PathVariable("no") int no) {
		client.send(no);
		return "done";
	}
}
